﻿@model SocialNetwork.User

@{
    ViewBag.Title = "EditUser";
}

<h2>EditUser</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>User</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.RoleId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RoleId)
            @Html.ValidationMessageFor(model => model.RoleId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsOnline)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsOnline)
            @Html.ValidationMessageFor(model => model.IsOnline)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RegDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RegDate)
            @Html.ValidationMessageFor(model => model.RegDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LoginDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LoginDate)
            @Html.ValidationMessageFor(model => model.LoginDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LogoffDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LogoffDate)
            @Html.ValidationMessageFor(model => model.LogoffDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Nickname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nickname)
            @Html.ValidationMessageFor(model => model.Nickname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Age)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Age)
            @Html.ValidationMessageFor(model => model.Age)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sex)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sex)
            @Html.ValidationMessageFor(model => model.Sex)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Mood)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Mood)
            @Html.ValidationMessageFor(model => model.Mood)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Avatara)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Avatara)
            @Html.ValidationMessageFor(model => model.Avatara)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HomeAddress)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HomeAddress)
            @Html.ValidationMessageFor(model => model.HomeAddress)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Hobbies)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Hobbies)
            @Html.ValidationMessageFor(model => model.Hobbies)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.JobPlace)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.JobPlace)
            @Html.ValidationMessageFor(model => model.JobPlace)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "UsersList")
</div>
